import request from './request'

// 获取当前用户的运动记录列表
export const getCurrentUserExerciseRecordsApi = () => request.get('/exercise-records/current')

// 创建运动计划
export const createExercisePlanApi = data => request.post('/exercise-plans', data)

// 创建运动记录
export const createExerciseRecordApi = data => request.post('/exercise-records', data)

// 更新运动记录
export const updateExerciseRecordApi = (id, data) => request.put(`/exercise-records/${id}`, data)

// 删除运动记录
export const deleteExerciseRecordApi = id => request.delete(`/exercise-records/${id}`)

// 获取每日运动总结
export const getDailyExerciseSummaryApi = date => request.get('/exercise-records/daily-summary', {
    params: { date }
})

// 获取运动记录详情
export const getExerciseDetailApi = id => request.get(`/exercise-records/${id}`)

// 获取运动历史记录
export const getExerciseHistoryApi = () => request.get('/exercise-records/history') 